<template>
  <div class="zhuanti">
    <div class="zhuanti_content">
      <div class="bloggerInfo">
        <router-link :to="{name:'BloggerInfo', params:{bloggerId:bloggerInfo.bloggerId}}">
          <img :src="bloggerInfo.bloggerPic" alt class="headPic">
        </router-link>
        <span class="bloggerName">{{bloggerInfo.bloggerName}}</span>
        <span class="guanzhu">关注ta</span>
      </div>
      <router-link class="blogPic" :to="{name:'Article',params:{bloggerId:bloggerInfo.bloggerId}}">
        <img v-if="bloggerInfo.bloggerArticles" :src="bloggerInfo.bloggerArticles[0].articlePic" alt="">
        <img v-else :src="bloggerInfo.articlePic" alt="">
      </router-link>
    </div>
  </div>
</template>

<script>
export default {
  name: "Zhuanti",
  data() {
    return {
    
    }
  },
  props: {
    bloggerInfo: {
      type: Object,
      required: true
    },
    title: {
      type: String,
      required: false
    }
  }
}
</script>

<style lang="less" scoped>
  .zhuanti{
    margin-top: 30px;
    padding-bottom: 20px;
    color: #808080;
    .zhuanti_content{
      background-color: #fff;
      padding-bottom: 20px;
      border-radius: 8px;
      box-shadow: 0 2px 20px rgba(0,0,0,.15);
      .bloggerInfo{
        height: 60px;
        
        position: relative;
        margin-bottom: 30px;
        .headPic{
          position: absolute;
          width: 80px;
          height: 80px;
          top: -20px;
          left: 0;
        }
       .bloggerName,.guanzhu{
          display: inline-block;
        }
        .bloggerName{
          line-height: 60px;
          font-size: 20px;
          margin-left:85px;
          text-align: center; 
          color: #333;
        }
        .guanzhu{
          border: 2px solid #808080;
          font-size: 16px;
          padding: 4px 10px;
          border-radius: 18px;
          color: #333;
          margin-left: 80px;
        }
      }
      .blogPic{
        img{
          height: 180px;
          width: 100%;
        }
      }
    }
  }
</style>


